package hrms.service.impl;
import java.util.HashMap;
import java.util.List;

import hrms.dao.emp.empMapper;
import hrms.pojo.Employee;
import hrms.service.empService;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
@Service("service")
public class empServiceImpl implements empService{
@Autowired
public empMapper empMapper;

public Employee doLogin(Employee emp){
	return empMapper.doLogin(emp);
}

public List<Employee> queryAllEmp(int currentPageNo, int pageSize) {
	// TODO Auto-generated method stub
List<Employee>list=empMapper.queryAllEmp(currentPageNo,pageSize);
return list;
}

public Employee doCode(String empCode) {
	// TODO Auto-generated method stub
	return empMapper.doCode(empCode);
}

public boolean insertEmp(Employee emp) {
	// TODO Auto-generated method stub
	boolean flag=false;
	flag=empMapper.insertEmp(emp);
	return flag;
}

public Employee queryCodeEmp(Employee emp) {
	// TODO Auto-generated method stub
	return empMapper.queryCodeEmp(emp);
}

public int modifyEmp(Employee emp) {
	// TODO Auto-generated method stub
	int count=0;
	count=empMapper.modifyEmp(emp);
	return count;
}

public int deleteEmp(int _empId) {
	// TODO Auto-generated method stub
	return empMapper.deleteEmp(_empId);
}

public List<Employee> queryAll() {
	// TODO Auto-generated method stub
	List<Employee>list=empMapper.queryAll();
	return list;

}

//public Employee queryPassword(Employee emp) {
//	System.out.println("employeeService=============empId:"+emp.getDeptId());
//	// TODO Auto-generated method stub
//	return empMapper.queryPassword(emp);
//}
}
